const mongoose = require('../db') 

var Admin = mongoose.Schema({
    username:String,
    password:String,
    cart:Array
})

var admin = mongoose.model('admin',Admin);

// var a = new admin({
//     username:'1914010123',
//     password:'123456',
//     cart:[
//         {
//                 title : "【冰淇淋】梦龙松露巧克力口味冰淇淋65克",
//                 price : 9.59,
//                 img : "https://img30.360buyimg.com/n6/s240x240_jfs/t1/211112/38/23700/35916/62b17690E8663e4f3/a9b9e4216bb73b53.jpg",
//                 classify : "京东到家"
//         },
//     ]
// })

// a.save().then((result) => {
//     console.log(result);
//     mongoose.disconnect();
// }).catch((err) => {
//     console.log(err);
//     mongoose.disconnect();
// })

module.exports = admin